import request from '@/router/axios';

/**
 * 获取库区列表
 * @param current 当前页
 * @param size 每页数据量
 * @returns {AxiosPromise}
 */
export const getParentList = (current, size,params) => {
  return request({
    url: '/api/hg-logistics/inventory/count-line-side/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}


export const getChildList = (current, size, areaId,materialId) => {
  return request({
    url: '/api/hg-logistics/inventory/count-line-side/page-box',
    method: 'get',
    params: {
      areaId,
      materialId,
      current,
      size
    }
  })
}


export const getDetailList = (current, size, inventoryId, params) => {
  return request({
    url: '/api/hg-logistics/inventory/count-line-side/page-sku',
    method: 'get',
    params: {
      ...params,
      current,
      size,
      inventoryId,
    }
  })
}

export const getAreaList = (current, size,params) => {
  return request({
    url: '/api/hg-logistics/inventory/area/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getMaterialTypeList = () => {
  return request({
    url: '/api/hg-public/material/type/get-all-second-type',
    method: 'get',
  })
}

export const getMaterialList = (current,size,data) => {
  return request({
    url: '/api/hg-public/material/info/page',
    method: 'get',
    params: {
      ...data,
      current,
      size,
    }
  })
}
